package com.zhangfei.mapper;

import com.zhangfei.bean.Role;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface RoleMapper {

    @Select("SELECT b.* from tb_user_role as a   LEFT JOIN  tb_role as b   \n" +
            "    ON a.role_id = b.id\n" +
            "WHERE a.user_id = #{userId}")
    List<Role> selectByUserId(Long userId);
}
